package com.zlm.design.strategy;

import org.springframework.aop.support.AopUtils;

/**
 * @author zlm
 * @date 2025/5/14
 */
public interface CustomerService {

    /**
     * 获取用户类型注解的value
     * @return
     */
    default UserType findUserTypeFromService() {
        //SupportUserType annotation = this.getClass().getAnnotation(SupportUserType.class);
        SupportUserType annotation = AopUtils.getTargetClass(this).getAnnotation(SupportUserType.class);
        return annotation.value();
    }

    UserType support();

    boolean support(int recharge);

    String findCustomer();
}
